<template>
  <div class="pool-data">
    <div class="data-item item-total">
      <div class="title">Genesis NFT Pool</div>
      <div class="value">
        <img class="poolIcon" src="@/assets/images/pool/poolIcon.png" alt="" />
        <span>6,884,290,926</span>
      </div>
      <div class="usd-value">≈ $586,967</div>
    </div>
    <div class="data-sub-items">
      <div class="data-sub-item" v-for="(item, idx) in subItems" :key="idx">
        <div class="title">
          {{ item.name }}
          <a v-if="!idx" href="javascript:;" class="common-button">收取</a>
        </div>
        <div class="value">
          <img v-if="!idx" src="@/assets/images/pool/poolIcon.png" alt="" />
          <div class="amount">{{ item.value }}</div>
          <div v-if="item.price" class="usd-value">≈ ${{ item.price }}</div>
        </div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    tabList: {
      type: Array,
      default: null,
    },
  },
  data: () => ({
    selected: 0,
    subItems: [
      { name: "JOJO", value: "0", price: "2.3071" },
      { name: "总质押数量", value: "10,214" },
      { name: "我的质押数量", value: "0" },
      { name: "总挖矿算力", value: "2,739,950" },
      { name: "我的挖矿算力", value: "0" },
      { name: "1000算力/24H可获得（JOJO）", value: "27,059", price: "2.3071" },
    ],
  }),
};
</script>
<style  lang="scss" scoped>
@import "./../../../common/styles/common.scss";
.pool-data {
  -webkit-box-shadow: 0 10px 15px -3px rgb(0 0 0 / 3%),
    0 4px 6px -2px rgb(0 0 0 / 1%);
  box-shadow: 0 10px 15px -3px rgb(0 0 0 / 3%), 0 4px 6px -2px rgb(0 0 0 / 1%);
  background: #fff;
  border-radius: 32px;

  @media screen and (min-width: 960px) {
    padding: 32px;
  }
  @media screen and (min-width: 300px) and (max-width: 960px) {
    padding: 20px;
  }
  .data-item {
    -webkit-box-shadow: 2px 4px 8px 0 rgb(0 0 0 / 6%),
      0 -1px 2px 0 rgb(0 0 0 / 2%);
    box-shadow: 2px 4px 8px 0 rgb(0 0 0 / 6%), 0 -1px 2px 0 rgb(0 0 0 / 2%);
    border-radius: 24px;
    @include flex();
    @include flex_column();
    @include flex_center();
    @include flex_align_center();
    @media screen and (min-width: 960px) {
      padding: 24px;
    }
    @media screen and (min-width: 300px) and (max-width: 960px) {
      padding: 15px;
    }
    .item-total {
      text-align: center;
    }
    .title {
      color: #694f4e;
      @media screen and (min-width: 960px) {
        font-size: 25px !important;
      }
      @media screen and (min-width: 300px) and (max-width: 960px) {
        font-size: 18px !important;
      }
    }
    .poolIcon {
      width: 28px;
      height: 28px;
      vertical-align: top;
      max-width: 100%;
      margin-right: 10px;
      @media screen and (min-width: 300px) and (max-width: 960px) {
        width: 20px;
        height: 20px;
      }
    }
    .value {
      -webkit-box-pack: center;
      -ms-flex-pack: center;
      justify-content: center;
      font-size: 36px;
      font-weight: 700;
      color: #431216;
      display: -webkit-box;
      display: -ms-flexbox;
      display: flex;
      -webkit-box-align: center;
      -ms-flex-align: center;
      align-items: center;
      margin-top: 10px;
      line-height: 1.1;
      @media screen and (min-width: 300px) and (max-width: 960px) {
        font-size: 25px;
      }
    }
    .usd-value {
      font-size: 18px;
      margin-top: 6px;
      color: #431216;
      @media screen and (min-width: 300px) and (max-width: 960px) {
        font-size: 15px;
      }
    }
  }
  .data-sub-items {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    margin: 8px -12px 0;
    .data-sub-item {
      -webkit-box-flex: 1;
      -ms-flex: 1;
      flex: 1;
      min-width: 280px;
      margin: 24px 12px 0;
      -webkit-box-shadow: 2px 4px 8px 0 rgb(0 0 0 / 6%),
        0 -1px 2px 0 rgb(0 0 0 / 2%);
      box-shadow: 2px 4px 8px 0 rgb(0 0 0 / 6%), 0 -1px 2px 0 rgb(0 0 0 / 2%);
      border-radius: 24px;
      padding: 24px;
      @media screen and (min-width: 300px) and (max-width: 960px) {
        padding: 15px;
      }
      .title {
        color: #694f4e;
        font-size: 14px;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        min-height: 24px;
        @media screen and (min-width: 300px) and (max-width: 960px) {
          font-size: 14px !important;
        }
      }
      .common-button {
        background: #fad551;
        height: 24px;
        font-size: 12px;
        padding: 0 12px;
        border-radius: 8px;
        border: 0 none;
        color: #431216;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        outline: none;
        text-align: center;
        cursor: pointer;
        font-weight: 700;
        padding: 0 18px;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        border-radius: 12px;
        -webkit-transition: -webkit-transform 0.2s ease;
        transition: -webkit-transform 0.2s ease;
        transition: transform 0.2s ease;
        transition: transform 0.2s ease, -webkit-transform 0.2s ease;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        -webkit-box-pack: center;
        -ms-flex-pack: center;
        justify-content: center;
        line-height: 1.1;
        -webkit-box-sizing: border-box;
        box-sizing: border-box;
        text-decoration: none;
      }
      .value {
        font-size: 26px;
        color: #431216;
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        margin-top: 10px;
        line-height: 1.1;
        @media screen and (min-width: 300px) and (max-width: 960px) {
          font-size: 20px;
        }
        img {
          width: 24px;
          height: 24px;
          margin-right: 8px;
          @media screen and (min-width: 300px) and (max-width: 960px) {
            width: 18px;
            height: 18px;
          }
        }
        .amount {
          font-weight: 700;
        }
        .usd-value {
          font-size: 14px;
          color: #694f4e;
          margin-left: 4px;
        }
      }
    }
  }
}
</style>